<template>
<!-- 试卷详情 -->
  <div>
    <!-- {{ExamAdd.questions}} -->
    <h2 :style="{padding: '20px',margin: '10px'}">创建试卷</h2>
    <div class="main" v-for="item in ExamAdd.questions" :key="item.questions_id">
      <div :style="{fontWeight:800}">{{item.questions_type_text}}</div>
      <div class="main_chil">{{item.questions_stem}}</div>
    </div>
    <el-button type="primary" @click="btn">创建试卷</el-button>
  </div>
</template>

<script>
import { mapState, mapActions, mapMutations } from 'vuex'
export default {
  data () {
    return {
      aaa: 1111
    }
  },
  created () {
    this.postExamAddAll()
    // this.getExamAdd()
    this.$message('这是一条消息提示');
  },
  methods: {
    ...mapMutations(['postExamAddAll']),
    ...mapActions(['postExamAdd']),
    btn () {
      // this.postExamAdd(this.ruleForm)
      console.log("找不到接口")
    }
  },
  computed: {
    ...mapState({
      ExamAdd: (state) => state.GetExam.ExamAdd
    })
  }
}
</script>

<style lang="scss" scoped>
.main{
  margin: 20px;
  border: solid 1px #000;
  // font-weight: ;
}
.main_chil{
  padding: 10px;
  margin: 15px;
  background: #ccc;
}
</style>
